<div nz-form-item nz-row style="margin-top:15px;margin-bottom:10px;">
  <div nz-col [nzSpan]="6">
    <button nz-button [nzType]="'primary'" [nzSize]="'small'" col-offset-2 (click)="toBack()">
      <i class="anticon anticon-left"></i>
      <span>返回</span>
    </button>
  </div>
</div>

<nz-collapseset>
  <nz-collapse [nzTitle]="panels.name" [nzActive]="panels.active" [nzDisabled]="panels.disabled">
    <form nz-form>
      <div nz-form-item nz-row>
        <div nz-form-label nz-col [nzXs]="2">
          <label>电梯类型</label>
        </div>
        <div nz-form-control nz-col [nzSpan]="4">
          <nz-select nzAllowClear [nzPlaceHolder]="'请选择'" [nzShowSearch]="true"  [nzSize]="'small'"
                     [(ngModel)]="elevatorInfo.elevatorTypeId" name="elevatorTypeId" [disabled]="false">
            <nz-option *ngFor="let item of elevatorTypes" [nzLabel]="item.label" [nzValue]="item.value"></nz-option>
          </nz-select>
        </div>

        <div nz-form-label nz-col [nzXs]="2">
          <label>电梯编号</label>
        </div>
        <div nz-form-control nz-col [nzSpan]="4">
          <nz-input [nzPlaceHolder]="'请输入'" [(ngModel)]="elevatorInfo.elevatorNum" name="planName">
          </nz-input>
        </div>

        <button style="margin-left: 50px"  nz-button  [nzType]="'primary'" (click)="query()">查询</button>
      </div>
    </form>
  </nz-collapse>
</nz-collapseset>
<nz-table #nzTable [nzDataSource]="list" nzSize="middle" [nzBordered]="true" [nzIsPagination]="false" (nzDataChange)="displayDataChange($event)">
  <thead nz-thead>
    <tr>
      <th nz-th [nzCheckbox]="true">
        <label nz-checkbox [(ngModel)]="allChecked" [nzIndeterminate]="indeterminate" (ngModelChange)="checkAll($event)">
        </label>
      </th>
      <th nz-th>
        <span>电梯编码</span>
      </th>
      <th nz-th>
        <span>电梯类型</span>
      </th>
      <th nz-th>
        <span>电梯安全管理员</span>
      </th>
      <th nz-th>
        <span>电梯安装地址</span>
      </th>
      <th nz-th>
        <span>维保人员</span>
      </th>
      <th nz-th>
        <span>维保人员初次取证时间</span>
      </th>
      <th nz-th>
        <span>是否已有两次以上维保</span>
      </th>
      <th nz-th>
        <span>详情</span>
      </th>
    </tr>
  </thead>
  <tbody nz-tbody>
  <tr nz-tbody-tr *ngFor="let data of list">
    <td nz-td [nzCheckbox]="true">
      <label nz-checkbox [nzDisabled]="data.disabled" [(ngModel)]="data.checked" (ngModelChange)="refreshStatus($event)">
      </label>
    </td>
    <td nz-td>{{data.elevatorNum}}</td>
    <td nz-td>{{data.elevatorTypeName}}</td>
    <td nz-td>{{data.safeUserName}}</td>
    <td nz-td>{{data.buildAddr}}</td>
    <td nz-td>{{data.maintenanceUserFirstName}}</td>
    <td nz-td>{{data.firstgt | dateFormat}}</td>
    <td nz-td>{{data.isMaint}}</td>
    <td nz-td><button nz-button  [nzSize]="'small'" [nzType]="'primary'" (click)="toDetail(data)">查看</button></td>
  </tr>
  </tbody>
</nz-table>
<nz-pagination [nzPageIndex]="elevatorInfo.currentPage" nzShowTotal [nzTotal]="total" nzShowSizeChanger
               (nzPageSizeChange)="nzPageSizeChange($event)" (nzPageIndexChange)="nzPageIndexChange($event)"
               (nzPageIndexClickChange)="nzPageIndexClickChange($event)" [nzPageSize]="elevatorInfo.pageSize"></nz-pagination>
